﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SchoolMerge.aspx.cs" Inherits="HealthSystem.sysAdmin.SchoolMerge" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:PageManager runat="server" AutoSizePanelID="p1" />
    <ext:Panel ID="p1" runat="server" Layout="HBox" Title="学校合并" ShowBorder="false" ShowHeader="false" AutoScroll="true">
        <Items>
            <ext:Panel runat="server" Title="选择学校" Width="520px">
            <Toolbars>
                <ext:Toolbar ID="Toolbar1" runat="server">
                    <Items>
                            <ext:Label ID="Label1" runat="server" Text="选择地区"></ext:Label>
                            <ext:TriggerBox runat="server" ID="name" EnableEdit="false"></ext:TriggerBox>
                            <ext:HiddenField runat="server" ID="districtid"></ext:HiddenField>
                            <ext:HiddenField runat="server" ID="actionbt"></ext:HiddenField>
                            <ext:ToolbarSeparator ID="ToolbarSeparator1" runat="server"></ext:ToolbarSeparator>
                            <ext:TriggerBox runat="server" ID="searchbox" EmptyText="输入学校名称查询" TriggerIcon="Search" OnTriggerClick="Search_Clik"></ext:TriggerBox>
                            <ext:ToolbarFill runat="server"></ext:ToolbarFill>
                            <ext:Button runat="server" Text="合并历史记录" OnClick="ShowMergeHistory" Icon="Door"></ext:Button>
                    </Items>
                </ext:Toolbar>
            </Toolbars>
                <Items>
                    <ext:Grid runat="server" ID="Gird1" DataKeyNames="SchoollCode,schoolname,Statute" EnableCheckBoxSelect="true" AllowPaging="true"  IsDatabasePaging="true" EnableRowNumber="true"
              ShowHeader="false" OnPageIndexChange="PageIndexChange" Height="540px">
                <Columns>
     <%--               <ext:BoundField DataField="OrgName" HeaderText="体检机构" />--%>
    <%-- <ext:LinkButtonField Icon="Add" CommandName="add" />--%>
                   <%-- <ext:CheckBoxField Width="60px" RenderAsStaticField="true" HeaderText="选择"/>--%>
                    <ext:BoundField DataField="schoolname" HeaderText="学校名称" Width="150px" />
                    <ext:BoundField DataField="cityname" HeaderText="所属城市" Width="70px" />
                    <ext:BoundField DataField="districtname" HeaderText="所属区县" Width="70px" />
                    <ext:BoundField DataField="XX_UserName" HeaderText="学校主账户" Width="70px" />
                    <ext:BoundField DataField="Statute" HeaderText="学校状态" Width="70px" />
                    <ext:CheckBoxField DataField="Permit" SortField="Permit" HeaderText="是否授权" RenderAsStaticField="true"
                             Width="70px" />
                </Columns>
            </ext:Grid>
                </Items>
            </ext:Panel>
            <ext:Panel runat="server" ShowBorder="false" ShowHeader="false" Width="50px">
                <Items>
                    <ext:Button runat="server" Text="" Icon="ArrowRight" Size="Large"  ID="selected" CssStyle=".height: 180px;.margin-top:200px" OnClick="selected_Click"></ext:Button>
                </Items>
            </ext:Panel>
            <ext:Panel  runat="server" Layout="Fit" ShowHeader="false" Height="590px" Width="500px">
        <Toolbars>
            <ext:Toolbar ID="Toolbar2" runat="server">
                <Items>
                   <ext:Button ID="Button1" runat="server" Text="合并" ConfirmText="确认合并学校" ConfirmTarget="Self" OnClick="Save_Click" Icon="ArrowJoin" ValidateForms="form2"></ext:Button>
                   <ext:ToolbarSeparator ID="ToolbarSeparator2" runat="server"></ext:ToolbarSeparator>
                </Items>
            </ext:Toolbar>
        </Toolbars>
        <Items>
            <ext:Form ID="form2"  runat="server" ShowHeader="false" EnableBackgroundColor="true" BodyPadding="10px">
                <Rows>
                    <ext:FormRow>
                        <Items>
                            <ext:Panel runat="server" ShowBorder="false" BodyPadding="5px 5px 10px 0px" ShowHeader="false" Layout="Column" EnableBackgroundColor="false">
                                <Items>
                                     <ext:Label ID="Label2" Text="需要合并学校:" runat="server"  Width="105px"></ext:Label>
                                    <ext:Grid ID="grid2" runat="server"  ShowBorder="false" DataKeyNames="SchoollCode,Name" OnRowCommand="Row_Command" Width="280px" Height="150px" ShowGridHeader="true"  ShowHeader="false" EnableBackgroundColor="false">
                                        <Columns>
                                            <ext:BoundField DataField="SchoollCode" Hidden="true" />
                                            <ext:BoundField DataField="Name" HeaderText="学校名称" Width="150px" />
                                            <ext:LinkButtonField Text="" Icon="Delete" CommandName="cacel" Width="40px" />
                                        </Columns>
                                    </ext:Grid>
                                </Items>
                            </ext:Panel>
                        </Items>
                    </ext:FormRow>
                     <ext:FormRow>
                        <Items>
                            <ext:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" EnableBackgroundColor="true" Layout="Column">
                                <Items>
                                    <ext:Label ID="Label3" runat="server" Width="105px" Text="地区选择:"></ext:Label>
                                    <ext:TextBox runat="server" Label="新学校地区" ID="districtname" Readonly="true" Width="250px" Required="true" ShowRedStar="true"></ext:TextBox>
                                    <ext:HiddenField runat="server" ID="schooldistrictid"></ext:HiddenField>
                                    <ext:Button runat="server" Text="选择地区" ID="Button2"></ext:Button>
                                </Items>
                            </ext:Panel>
                            
                        </Items>
                    </ext:FormRow>
                    <ext:FormRow>
                        <Items>
                            <ext:TextBox runat="server" Label="新学校名称" ID="SchoolName" Required="true" ShowRedStar="true"></ext:TextBox>
                        </Items>
                    </ext:FormRow>
                    <ext:FormRow>
                        <Items>
                            <ext:CheckBox runat="server" Label="默认添加账户" Checked="true" ID="schoolcheck"></ext:CheckBox>
                        </Items>
                    </ext:FormRow>
                    <ext:FormRow>
                        <Items>
                            <ext:CheckBox runat="server" Label="授权" Checked="true" ID="permitcheck"></ext:CheckBox>
                        </Items>
                    </ext:FormRow>
                     <ext:FormRow>
                        <Items>
                            <ext:TextBox runat="server" Label="学校地址" ID="Address"></ext:TextBox>
                        </Items>
                    </ext:FormRow>
                     <ext:FormRow>
                        <Items>
                            <ext:TextBox runat="server" Label="联系人" ID="LinkMan"></ext:TextBox>
                        </Items>
                    </ext:FormRow>
                      <ext:FormRow>
                        <Items>
                            <ext:TextBox runat="server" Label="电话" ID="OfficePhone"></ext:TextBox>
                        </Items>
                    </ext:FormRow>
                      <ext:FormRow>
                        <Items>
                            <ext:TextBox runat="server" Label="手机" ID="MobilePhone"></ext:TextBox>
                        </Items>
                    </ext:FormRow>
                       <ext:FormRow>
                        <Items>
                            <ext:TextBox runat="server" Label="Email" ID="Email"></ext:TextBox>
                        </Items>
                    </ext:FormRow>
                      <ext:FormRow>
                        <Items>
                            <ext:DropDownList runat="server" ID="stype" Label="学校类型">
                            <ext:ListItem Text="小学" Value="小学" />
                            <ext:ListItem Text="初中" Value="初中" />
                            <ext:ListItem Text="高中" Value="高中"/>
                            <ext:ListItem Text="完中" Value="完中"/>
                            </ext:DropDownList>
                            <%--<ext:TextBox runat="server" Label="学校类型" ID="SchoolType"></ext:TextBox>--%>
                        </Items>
                    </ext:FormRow>
                      <ext:FormRow>
                        <Items>
                            <ext:Panel ID="Panel2" runat="server" Layout="Column" ShowHeader="false" EnableBackgroundColor="true" ShowBorder="false">
                                <Items>
                                    <ext:Label ID="Label4" runat="server" Text="机构:" Width="105px"></ext:Label>
                                    <ext:TextBox runat="server" Width="250px"  Label="机构" ID="OrgName" Readonly="true"></ext:TextBox>
                                    <ext:HiddenField runat="server" ID="OrgCode"></ext:HiddenField>
                                    <ext:Button runat="server" Text="选择体检机构" ID="choosebt"></ext:Button>
                                </Items>
                            </ext:Panel>
                            
                        </Items>
                    </ext:FormRow>
                    
                </Rows>
            </ext:Form>
        </Items>
    </ext:Panel>
        </Items>
    </ext:Panel>
      <ext:Window ID="Window1" CloseAction="HidePostBack" runat="server" IsModal="true" Hidden="true" Target="Self"
        EnableResize="true" EnableMaximize="true" EnableIFrame="true" IFrameUrl="about:blank"
        Width="200px" Height="550px" OnClose="Window1_Close">
    </ext:Window>
     <ext:Window ID="Window2" CloseAction="HidePostBack" runat="server" IsModal="true" Hidden="true" Target="Self"
        EnableResize="true" EnableMaximize="true" EnableIFrame="true" IFrameUrl="about:blank"
        Width="650px" Height="580px" OnClose="Window2_Close">
    </ext:Window>
    <ext:Window ID="Window3" CloseAction="HidePostBack" runat="server" IsModal="true" Hidden="true" Target="Self"
        EnableResize="true" EnableMaximize="true" EnableIFrame="true" IFrameUrl="about:blank"
        Width="200px" Height="550px">
    </ext:Window>
    </form>
</body>
</html>
